import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {LoginModule} from "./login/login.module";
import{AuthGuard} from './services/auth-guard.service';
const routes: Routes = [
  {path: '', redirectTo: 'login', pathMatch: 'full'},
  {path: 'projects', loadChildren: '../app/project#ProjectModule', canActivate: [AuthGuard]},
  // {path:'projects',loadChildren:'../app/project#ProjectModule',canActivate:[AuthGuard],pathMatch:'full'},
  {path: 'tasklists/:id', loadChildren: '../app/task#TaskModule', canActivate: [AuthGuard]},
  {path: 'mycal/:view', loadChildren: '../app/my-calendar#MyCalendarModule', canActivate: [AuthGuard]},
];

@NgModule({
  imports: [LoginModule, RouterModule.forRoot(routes, {useHash: true})],
  exports: [RouterModule]
})
export class AppRoutingModule { }
